Jump to content

Missing ModLoader in file (main)


Fake_Name131

Recommended Posts

I get this error whenever I try to run some test mod that I made because I decided to learn Forge modding

\

license="All rights reserved"
#issueTrackerURL="http://my.issue.tracker/" #optional
[[mods]] #mandatory
modId="somerandommodid" #mandatory
version="1.0.0" #mandatory
displayName="T E S T" #mandatory
#updateJSONURL="http://myurl.me/" #optional
#displayURL="https://example.com/" #optional
modLoader="javafml"
loaderVersion="[31,)" 
#logoFile="examplemod.png" #optional
#credits="Thanks for this example mod goes to Java" #optional
authors="Fake_Name131"
description='''
commands
  _fc/_fakechat
    Adds a fake message to chat. (Accepts & color codes)
'''
[[dependencies.somerandommodid]] #optional
    modId="forge" #mandatory
	mandatory=true #mandatory
	versionRange="[34,)" #mandatory
	ordering="NONE"
	side="Client"
[[dependencies.somerandommodid]]
    modId="minecraft"
    mandatory=true
    versionRange="[1.16.3]"
    ordering="NONE"
    side="BOTH"

 

Link to comment
Share on other sites

16 minutes ago, ChampionAsh5357 said:

Since I can't see the error, I'm gonna guess that it's telling you don't have a supplied mod loader or loader version since they are attached to the mods list instead of being global.

 

[mException in thread "main" [32m[17:21:55] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1050]: net.minecraftforge.fml.loading.moddiscovery.InvalidModFileException: Missing ModLoader in file (main)
[m[32m[17:21:55] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1050]: 	at net.minecraftforge.fml.loading.moddiscovery.ModFileInfo.lambda$new$0(ModFileInfo.java:64)
[m[32m[17:21:55] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1050]: 	at java.base/java.util.Optional.orElseThrow(Optional.java:408)
[m[32m[17:21:55] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1050]: 	at net.minecraftforge.fml.loading.moddiscovery.ModFileInfo.<init>(ModFileInfo.java:64)
[m[32m[17:21:55] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1050]: 	at net.minecraftforge.fml.loading.moddiscovery.ModFileParser.modsTomlParser(ModFileParser.java:62)
[m[32m[17:21:55] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1050]: 	at net.minecraftforge.fml.loading.moddiscovery.ModFileParser.readModList(ModFileParser.java:46)
[m[32m[17:21:55] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1050]: 	at net.minecraftforge.fml.loading.moddiscovery.ModFile.identifyMods(ModFile.java:113)
[m[32m[17:21:55] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1050]: 	at net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer.discoverMods(ModDiscoverer.java:116)
[m[32m[17:21:55] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1050]: 	at net.minecraftforge.fml.loading.FMLLoader.beginModScan(FMLLoader.java:213)
[m[32m[17:21:55] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1050]: 	at net.minecraftforge.fml.loading.FMLServiceProvider.runScan(FMLServiceProvider.java:107)
[m[32m[17:21:55] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1050]: 	at cpw.mods.modlauncher.TransformationServiceDecorator.runScan(TransformationServiceDecorator.java:114)
[m[32m[17:21:55] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1050]: 	at cpw.mods.modlauncher.TransformationServicesHandler.lambda$runScanningTransformationServices$8(TransformationServicesHandler.java:115)
[m[32m[17:21:55] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1050]: 	at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:271)
[m[32m[17:21:55] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1050]: 	at java.base/java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1675)
[m[32m[17:21:55] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1050]: 	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
[m[32m[17:21:55] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1050]: 	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
[m[32m[17:21:55] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1050]: 	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
[m[32m[17:21:55] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1050]: 	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
[m[32m[17:21:55] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1050]: 	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
[m[32m[17:21:55] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1050]: 	at cpw.mods.modlauncher.TransformationServicesHandler.runScanningTransformationServices(TransformationServicesHandler.java:116)
[m[32m[17:21:55] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1050]: 	at cpw.mods.modlauncher.TransformationServicesHandler.initializeTransformationServices(TransformationServicesHandler.java:63)
[m[32m[17:21:55] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1050]: 	at cpw.mods.modlauncher.Launcher.run(Launcher.java:75)
[m[32m[17:21:55] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1050]: 	at cpw.mods.modlauncher.Launcher.main(Launcher.java:65)
[m[32m[17:21:55] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1050]: 	at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:105)

 

Edited by Fake_Name131
Link to comment
Share on other sites

2 hours ago, Beethoven92 said:

Show your mods.toml file please

They did. It was their starting post. Also, it seems that my hypothesis was correct. the mods.toml is ordered by the default in the mdk. This means you moved the variables around expecting it to work. However, the brackets indicates that whatever comes afterwards is applied to the specific mod and not global information. The modloader and version are global information that must be known independent of the mod. Please look at a default mods.toml and order your variables accordingly.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.