User Tools

Site Tools


documentation:fabric_loader

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
documentation:fabric_loader [2019/06/07 18:22] – [Entrypoints] jamieswhiteshirtdocumentation:fabric_loader [2019/06/08 06:44] – [Nested jars] Some lil misspells :) falseresync
Line 13: Line 13:
 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. 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://fabricmc.net/wiki/tutorial:loader04x#nested_jars|guidelines]] for how to use nested jars effectively. Nested jars must be declared by their paths relative to the containing jar's root. A nested jar must itself also be a mod, which again can have nested jars. Fabric Loader will load nested jars while attempting to satisfy dependency constraints.+A mod may bundle a number of other mods within its JAR. See the [[https://fabricmc.net/wiki/tutorial:loader04x#nested_jars|guidelines]] for how to use nested JARs effectively. Nested JARs must be declared by their paths relative to the containing JAR's root. A nested JAR must itself also be a mod, which again can have nested JARs. Fabric Loader will load nested JARs while attempting to satisfy dependency constraints.
  
-Nested jars allow a mod to provide its own dependencies, so Fabric Loader can pick the best version matching the dependencies instead of requiring separate installation of dependencies. They also allow clean packaging of submodules, so each module can be used separately. Non-mod libraries can be repackaged as mods for nested jar usage.+Nested JARs allow a mod to provide its own dependencies, so Fabric Loader can pick the best version matching the dependencies instead of requiring separate installation of dependencies. They also allow clean packaging of submodules, so each module can be used separately. Non-mod libraries can be repackaged as mods for nested JAR usage.
  
-When loaded, nested jars are loaded into an in-memory file system using jimfs, then added to the classpath.+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, and other mods can specify their own entrypoint types for mod integrations. Entrypoints are loaded by language adapters, which will attempt to produce a Java object of a provided type using the name of the code object. 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, and other mods can specify their own entrypoint types for mod integrations. Entrypoints are loaded by language adapters, which will attempt to produce a Java object of a provided type using the name of the code object.
  
-An entrypoints is only loaded when entrypoints of the entrypoint's type are requested, which makes an entrypoint an excellent tool for optional mod integrations. A mod may support a specific entrypoint type by declaring that other mods should provide entrypoints under a specified name using a class or interface that the mod provides in its API. The entrypoint will only be loaded when the mod requests it, avoiding any issues with loading classes that may not be present when the mod is not installed.+An entrypoint is only loaded when entrypoints of the entrypoint's type are requested, which makes an entrypoint an excellent tool for optional mod integrations. A mod may support a specific entrypoint type by declaring that other mods should provide entrypoints under a specified name using a class or interface that the mod provides in its API. The entrypoint will only be loaded when the mod requests it, avoiding any issues with loading classes that may not be present when the mod is not installed.
  
 Fabric Loader has three built-in entrypoint types for mod initialization in relation to physical sides (see [[tutorial:side]]). These entrypoints are executed about as early as possible during the game's initialization, which means not all things are initialized or ready for modification. These entrypoints are typically used to bootstrap mods by registering registry objects, event listeners and other callbacks for doing things later. Fabric Loader has three built-in entrypoint types for mod initialization in relation to physical sides (see [[tutorial:side]]). These entrypoints are executed about as early as possible during the game's initialization, which means not all things are initialized or ready for modification. These entrypoints are typically used to bootstrap mods by registering registry objects, event listeners and other callbacks for doing things later.
documentation/fabric_loader.txt · Last modified: 2023/12/27 12:57 by 194.190.81.32