Dependencies

From Forge Community Wiki
Revision as of 00:37, 24 March 2021 by SciWhiz12 (talk | contribs) (Start page on dependencies)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This page is under construction.

This page is incomplete, and needs more work. Feel free to edit and improve this page!

A **dependency** is the reliance of a piece of software on another piece of software. In the context of Minecraft Forge, it is a mod or library which another mod has a dependency on.

Dependencies are declared in three ways:

  • The dependencies block in a Gradle buildscript defines compile-time and runtime dependencies, which is used by the build system and compiler when building or running the mod in the development environment.
  • The act of using classes, fields, and methods from a library creates a dependency on the library in the compiled binaries. The library may be an explicitly declared dependency, or a dependency of an explicitly declared dependency (such as the Guava libraries that Minecraft depends on).
  • Dependency configurations are declared in the mods.toml metafile, which is then checked by Forge on runtime on whether they are satisfied.