So your META-INF/neoforge.mods.toml file should contain a line like:
Here’s the relevant neoforge.mods.toml entry for modLoader :
modLoader = "javafml"
modLoader = "javafml" For Neoforge (and Forge-based mods), the modLoader value must be "javafml" . This tells the game’s mod loading system that your mod uses the standard Java-based FML (Forge Mod Loader) system. Even though Neoforge is a separate project from Forge now, it retains compatibility with the same mod loader specification.