Jump to content

Where do I put the --modListFile option?


TheTrueForce

Recommended Posts

I'm trying to adapt a modpack to the modlist json format, mostly because I can, and also because I can double up on a bunch of mods from another pack if I do. I've managed to grok the format of the file itself, but the wiki(https://github.com/MinecraftForge/FML/wiki/New-JSON-Modlist-format) says nothing(that I can see) about where you actually put it. And I seem to recall that it needs some sort of prefix as well.

Is anyone able to clarify this?

Link to comment
Share on other sites

It's a command-line option, add it to the command-line options in your launcher profile.

 

The path you use as the value of this option can either be an absolute path (in which case you need to prefix it with absolute:) or a path relative to the game directory.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

I did try that, and it gave me an error. I opened the file in pluma, and then opened the launcher, and it went and reset the file. touchy...

Anyway, just appending "--modListFile ./mods/modList.json"(sans quotes, obviously) to the JVM options in the MC launcher gave me this error:

Unrecognized option: --modListFile
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

That's why I suspected there was a prefix to that command involved. I think it was something like "-Dfml".

 

I should say that I'm on Linux, which didn't get the fancy new-look launcher. That may make a difference.

 

EDIT: And I was using the wrong Forge version that time. The actual version I was supposed to be using(Forge build 2281) just doesn't start up at all. I suspect that the reset may have gone further than I originally thought... I'll check that, because I'm pretty sure I got an error.

 

EDIT 2: Ok, so I do actually get that error after making sure that it's got everything. And that I don't get it on other things.

Edited by TheTrueForce
Link to comment
Share on other sites

You're getting that error because the launcher is passing --modListFile as a JVM argument.

 

On closer inspection, it looks like Mojang's launcher only lets you set the command-line options for the JVM but not for Minecraft. The only way to add command-line arguments for Minecraft seems to be to create a new version and specify them there.

 

If you don't want to do this, you can save your file to one of the paths that FML automatically checks: mods/mod_list.json or mods/<minecraft_version>/mod_list.json.

  • Like 1

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

That would explain the error... Thank you for your help, Choonster. I changed the filename of my json file, and now it's getting to the point of FML crashing. So It's working more than it was before.

In the file itself, are characters like hyphens, spaces and apostrophes permitted in the specifiers? And are you limited to three colons? because I think I may be doing things wrong. For example, I'm doing

"Aroma1997s-Dimensional-World:1.9.4:1.2.0.6"

in my json, intending it to load

repositoryRoot/Aroma1997s-Dimensional-World/1.9.4/1.2.0.6/Aroma1997s-Dimensional-World-1.9.4-1.2.0.6.jar

Among others. I'm getting this error

[09:59:13] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.FMLLaunchHandler:setupHome:106]: java.lang.ArrayIndexOutOfBoundsException: 2
[09:59:13] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.FMLLaunchHandler:setupHome:106]: 	at net.minecraftforge.fml.relauncher.ModListHelper.parseListFile(ModListHelper.java:140)
[09:59:13] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.FMLLaunchHandler:setupHome:106]: 	at net.minecraftforge.fml.relauncher.ModListHelper.parseModList(ModListHelper.java:75)
[09:59:13] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.FMLLaunchHandler:setupHome:106]: 	at net.minecraftforge.fml.relauncher.CoreModManager.discoverCoreMods(CoreModManager.java:261)
[09:59:13] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.FMLLaunchHandler:setupHome:106]: 	at net.minecraftforge.fml.relauncher.CoreModManager.handleLaunch(CoreModManager.java:255)
[09:59:13] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.FMLLaunchHandler:setupHome:106]: 	at net.minecraftforge.fml.relauncher.FMLLaunchHandler.setupHome(FMLLaunchHandler.java:102)
[09:59:13] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.FMLLaunchHandler:setupHome:106]: 	at net.minecraftforge.fml.relauncher.FMLLaunchHandler.setupClient(FMLLaunchHandler.java:79)
[09:59:13] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.FMLLaunchHandler:setupHome:106]: 	at net.minecraftforge.fml.relauncher.FMLLaunchHandler.configureForClientLaunch(FMLLaunchHandler.java:41)
[09:59:13] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.FMLLaunchHandler:setupHome:106]: 	at net.minecraftforge.fml.common.launcher.FMLTweaker.injectIntoClassLoader(FMLTweaker.java:138)
[09:59:13] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.FMLLaunchHandler:setupHome:106]: 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:115)
[09:59:13] [main/INFO] [STDERR]: [net.minecraftforge.fml.relauncher.FMLLaunchHandler:setupHome:106]: 	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

I suspect that this means I've got too many things in one specifier in my json.

What do you think? I can post the whole log(it's really short), and the mod list file, if necessary.

Link to comment
Share on other sites

Each specifier must be composed of either three or four parts separated by colons. The parts can contain any other character (that the OS allows in a file name).

 

That exception means that you've got a specifier with less than three parts to it.

 

Could you post the entire FML log and the mod list file that caused that error?

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

That'd be right. Some of these mods use version schemes that are less than compatible with the Maven system. Botania is one of them. I'll have to rename a few more files, then...

 

I can indeed post those files.

The modlist file does not specify every mod in the pack. I got halfway through converting i before I remembered to test it.

fml-client-latest.log

mod_list.json

Link to comment
Share on other sites

Your file isn't really following the format properly, you're treating the first part of the specifier as the mod name instead of the group ID.

 

I explain each part of the specifier format in more detail here.

 

Instead of Aroma1997s-Dimensional-World:1.9.4:1.2.0.6, use aroma1997:Aroma1997s-Dimensional-World:1.9.4-1.2.0.6. This will be mapped to <repositoryRoot>/aroma1997/Aroma1997s-Dimensional-World/1.9.4-1.2.0.6/Aroma1997s-Dimensional-World-1.9.4-1.2.0.6.jar.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

Oh. That's... counter-intuitive. I was using it as modName:MCVersion:modVersion. That results in a fairly neat directory structure. I also tend to think in terms of 'what mod is this', rather than 'whose mod is this'. That's why I did it that way. It would also have had the effect of keeping the mod versions sorted by minecraft version.

This is clearly going to cause stupid problems if I don't change it. Blast.

 

EDIT: Thank you again. I just got a dependency error, so that means it's loading something.

Edited by TheTrueForce
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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hey folks. I am working on a custom "Mecha" entity (extended from LivingEntity) that the player builds up from blocks that should get modular stats depending on the used blocks. e.g. depending on what will be used for the legs, the entity will have a different jump strength. However, something unexpected is happening when trying to override a few of LivingEntity's functions and using my new own "Mecha" specific fields: instead of their actual instance-specific value, the default value is used (0f for a float, null for an object...) This is especially strange as when executing with the same entity from a point in the code specific to the mecha entity, the correct value is used. Here are some code snippets to better illustrate what I mean: /* The main Mecha class, cut down for brevity */ public class Mecha extends LivingEntity { protected float jumpMultiplier; //somewhere later during the code when spawning the entity, jumpMultiplier is set to something like 1.5f //changing the access to public didn't help @Override //Overridden from LivingEntity, this function is only used in the jumpFromGround() function, used in the aiStep() function, used in the LivingEntity tick() function protected float getJumpPower() { //something is wrong with this function //for some reason I can't correctly access the fields and methods from the instanciated entity when I am in one of those overridden protected functions. this is very annoying LogUtils.getLogger().info(String.valueOf(this.jumpMultiplier))) //will print 0f return this.jumpMultiplier * super.getJumpPower(); } //The code above does not operate properly. Written as is, the entity will not jump, and adding debug logs shows that when executing the code, the value of this.jumpMultiplier is 0f //in contrast, it will be the correct value when done here: @Override public void tick() { super.tick(); //inherited LivingEntity logic //Custom logic LogUtils.getLogger().info(String.valueOf(this.jumpMultiplier))) //will print 1.5f } } My actual code is slightly different, as the jumpMuliplier is stored in another object (so I am calling "this.legModule.getJumpPower()" instead of the float), but even using a simple float exactly like in the code above didn't help. When running my usual code, the object I try to use is found to be null instead, leading to a crash from a nullPointerException. Here is the stacktrace of said crash: The full code can be viewed here. I have found a workaround in the case of jump strength, but have already found the same problem for another parameter I want to do, and I do not understand why the code is behaving as such, and I would very much like to be able to override those methods as intended - they seemed to work just fine like that for vanilla mobs... Any clues as to what may be happening here?
    • Please delete post. Had not noticed the newest edition for 1.20.6 which resolves the issue.
    • https://paste.ee/p/GTgAV Here's my debug log, I'm on 1.18.2 with forge 40.2.4 and I just want to get it to work!! I cant find any mod names in the error part and I would like some help from the pros!! I have 203 mods at the moment.
    • In 1.20.6 any potion brewed in the brewing stand disappears upon completion.
    • My game crashes whenever I click on Singleplayer then it crashes after the "Saving world". I'm playing on fabric 1.20.1 on forge for the easy instance loading. My game is using 12GB of RAM, I tried deleting the options.txt, and also renaming the saves file but neither worked. Here's the crash report link: https://mclo.gs/qByOqVK
  • Topics

×
×
  • Create New...

Important Information

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