neoforge.mods.toml file to use in your project? Copy Creating a public link... Good response Bad response 7 sites Mod Files | NeoForged docs javafml and @Mod javafml is a language loader provided by NeoForge for the Java programming language. The entrypoint is defined ... NeoForged Documentation Mod Files | NeoForged docs The language loader used by the mod(s). Can be used to support alternative language structures, such as Kotlin objects for the mai... NeoForged Documentation Mod Files | NeoForged docs The language loader used by the mod(s). Can be used to support alternative language structures, such as Kotlin objects for the mai... NeoForged docs Mod Files | NeoForged docs Mod Entrypoints Now that the neoforge. mods. toml is filled out, we need to provide an entrypoint for the mod. Entrypoints are es... NeoForged Documentation [Solved] Forge failing to load mods.toml (Setup wasn't correct) Mar 28, 2020 —
For mod developers, the practical implication is straightforward but vital. When setting up a new project in the NeoForge environment, the mods.toml file should strictly use modLoader="neoforge" . Using the legacy javafml tag in a modern NeoForge mod can lead to warnings, unexpected behavior, or incompatibility as the gap between the legacy Forge codebase and the modern NeoForge codebase widens. The accompanying loaderVersion property must also align with this change, specifying the version range of the NeoForge loader rather than the old FML version.
Other specialized loaders exist, such as lowcodefml for "low-code" or no-code modding, but for 99% of developers writing standard Java or Kotlin mods, javafml is the requirement. Common Pitfalls and Version Differences
To understand the distinction, one must first recognize that javafml is the legacy value. FML, or the "Forge Mod Loader," has been the engine powering Forge mods since Minecraft’s early days. For nearly a decade, virtually every Forge mod declared modloader="javafml" . This string told the Forge-compatible loader to initialize the mod using the standard FML system, which expects certain entrypoints (like a class annotated with @Mod ) and follows a well-worn lifecycle. When Neoforge forked from Forge in mid-2023, it initially retained compatibility with javafml mods, allowing thousands of existing mods to run unchanged. However, as Neoforge began diverging—removing deprecated APIs, refactoring the core loader, and introducing new features—it became necessary to distinguish between mods designed for the old Forge ecosystem and those built explicitly for Neoforge’s modernized architecture. neoforge mods.toml modloader value neoforge or javafml
In the ecosystem of Minecraft modding, few files are as critical to a mod’s identity as mods.toml . This metadata file, placed inside a mod’s JAR, acts as its passport, telling the game loader who the mod is, what version it needs, and—most critically— how it should be loaded. For mods built on Neoforge, a successor to the legacy Forge API, one line in this file has become a subtle but important source of confusion and precision: modloader . The choice between specifying modloader="neoforge" or modloader="javafml" is not arbitrary; it defines the mod’s technical lineage, its compatibility, and its place in the evolving history of Minecraft modding.
A standard configuration in META-INF/neoforge.mods.toml looks like this:
: This is the standard value for most developers. It tells NeoForge that your mod is written in Java and uses the @Mod annotation to define its entry point. neoforge
In the neoforge.mods.toml (or mods.toml ) file, the modLoader value you should use depends on the language your mod is written in, as NeoForge uses this field to identify the responsible for your mod's entry point. Core Values
Why does this matter to the average modder or server admin? Because misusing this value leads to the classic "loader mismatch" errors. A common mistake is to copy a mods.toml from an old Forge mod, change the name and description, but leave modloader="javafml" . When loaded in a pure Neoforge environment (especially one that has disabled legacy fallbacks), the loader may reject the mod or attempt to run it in an incomplete legacy mode, causing cryptic crashes or missing features. Conversely, setting modloader="neoforge" for a mod that still relies on old Forge internals will cause the Neoforge loader to look for entrypoints or behaviors that don’t exist. Therefore, the rule is straightforward:
Are you migrating an , or are you setting up a new NeoForge project from scratch? Mod Files | NeoForged docs The entrypoint is defined
NeoForge was born as a fork of Minecraft Forge, inheriting many of its foundational systems. The javafml loader is the default mechanism that looks for the @Mod annotation in your Java classes.
In conclusion, the modloader field in mods.toml is far from a mere formality. The choice between "neoforge" and "javafml" is a declaration of technical allegiance and a practical key to compatibility. While javafml preserves the legacy of a generation of mods, neoforge opens the door to a cleaner, more forward-looking future. For any mod developer working with Neoforge today, setting the correct value is not just good practice—it is the first step in telling the loader, and the world, exactly what your mod is made of.
modLoader="javafml" # The language loader used (standard for Java) loaderVersion="[1,)" # The version range of the loader license="MIT" [[mods]] modId="examplemod" version="1.0.0" displayName="Example Mod" Use code with caution. Copied to clipboard
: While NeoForge is the platform, neoforge itself is typically not the value for the modLoader field in your metadata file; rather, it's often used in the dependencies section to specify the version of the NeoForge API required. Key Differences & Usage