Resource Pack Overrides [Forge & Fabric]

Resource Pack Overrides [Forge & Fabric]

19M Downloads

[Bug]: Config file not being created

Chongo333 opened this issue · 5 comments

commented

Mod Loader (Required)

Forge

Minecraft Version(s) (Required)

1.19.2

Mod Version(s) (Required)

v4.0.4

Notes (Required)

I've tried manually adding the config file to see if the mod would use it, changing to a previous version, checked if the modpack actually recognized the mod. Made sure there were no other mods needed, since I'm on forge. Nothing seems to be working. It's just not making a config file for the mod. Not sure if I missed a required mod, or what.

latest.log (Required)

https://gist.github.com/Chongo333/41416fe3e4fa4a61d69f497fb5205619

commented

Having the exact same problem. Real bummer.

commented

I backported to previous versions of the mod, and I still had the same issue. It does not create a config file and ignores a manually created one anyway. The only thing that worked is the debug controls in 4.0.3 and 4.0.4.

commented

Check your log, it tell's you what is wrong. Probably the schema_version, set it to 1.

commented

Fourth Launch

Details

I updated my config file to also change the title and description of Mod resources (mod_resources).

Config

{
"schema_version": 1,
"failed_reloads_per_session": 5,
"default_packs": [
],
"default_overrides": {
"force_compatible": true
},
"pack_overrides": {
"vanilla": {
"title": ""Vanilla Assets"",
"description": ""Resource pack from Minecraft""
},
"server": {
"default_position": "BOTTOM",
"force_compatible": true,
"fixed_position": false
},

"mod_resources": {
  "title": "\"Modded Assets\"",
  "description": "\"Resources for Mods\""

}

}
}

Holding R on the resource pack screen did not reflect the changes, even when I deleted the override for the title and description of vanilla resources.

Relaunching the game, however, did work.

Key Takeaways

It appears I was mistaken in my third launch. The mod does work, but it requires a full restart. Holding the R key does not work.
↳ Keep in mind, this was only from the main menu. F3 + T may also do it, but I haven't the time to check right now.

image

commented

TL;DR

Though the mod appears to recognize the config file when it is manually created, and subsequently converts that JSON file to Java code, Resource Pack Overrides appears to ignore the config file's contents entirely.

Edit:

Wait a minute. I think it worked. Somehow I missed that the Minecraft resources were renamed successfully. Well this is embarrassing. I'll make more changes to the config and see if that works. Feel free to peruse the rest of this, but know that I may have been mistaken on the third launch. I do apologize.


Okay, I'm just kind of keeping track as I go here.

...

First Game Launch

Details

After launching the game, I get the registry with MOD provider, as well as the mod itself confirming that it is up to date. But there are two interesting lines with 'resourcepackoverrides` in them:

  • [Render thread/WARN]: PathResourcePack base class instantiated with root path of mod file ResourcePackOverrides-v4.0.4-1.19.2-Forge.jar. This probably means a mod should be calling ResourcePackLoader.createPackForMod instead. Applying workaround.

and then,

  • [Render thread/ERROR]: Failed to read resourcepackoverrides.json in config directory: java.io.FileNotFoundException: C:\Users\<...>\curseforge\minecraft\Instances\<modpack instance>\config\resourcepackoverrides.json (The system cannot find the file specified)

While I'm not sure what the former of those two means, the latter is consistent with this issue.

Key Takeaway:

The mod does not generate its own config file. Instead, it reports that the file isn't found.


Second Launch

Details

After closing the game, adding an empty file at <modpack instance>\config\resourcepackoverrides.json, and launching the game again, these lines appear for a filter of resourcepackoverrides:

  • The former line from the previous launch.

  • [Render thread/ERROR]:Failed to read resourcepackoverrides.json in config directory: java.lang.NullPointerException: Cannot invoke "com.google.gson.JsonElement.isJsonObject()" because "p_13919_" is null

Which makes sense. It found the file, but there was no JSON to convert to Java code because the file was empty.

Key Takeaway:

After making a correctly named file in the correct location, the mod converts the JSON to Java code, if the config file is compatible.


Third Launch

Details

I close the game once again. I open the resourcepackoverrides.json config file, and I paste in the complete example from the GitHub repo page. Then, I change the schema version to 1 like you suggested, also removing the comments and verifying that the file is valid JSON. I also remove the example group and any references to resource packs that aren't there (e.g. file/my_awesome_pack.zip).

If you'd like to see my config file now, I'll put it under this details tag:

Config File

{
  "schema_version": 1,
  "failed_reloads_per_session": 5,
  "default_packs": [
  ],
  "default_overrides": {
    "force_compatible": true
  },
  "pack_overrides": {
    "vanilla": {
      "title": "\"Vanilla Assets\"",
      "description": "\"Resource pack from Minecraft\""
    },
    "server": {
      "default_position": "BOTTOM",
      "force_compatible": true,
      "fixed_position": false
    }
  }
}

I open the game once more, and though the .createPackForMod warning is still there, there are no errors.
That said, the resource pack overrides do not appear to change the text for the vanilla resource pack.

Key Takeaway:

Though there are no more errors popping up in my log, the mod still ignores the contents of the config file.
This is also a problem I ran into with the Schema set to 2.


I'm afraid that's the extent of my ability to gauge the problem.
While the debug key D seems to work, I had no noticeable results with the other keys R, C, and T.

image

I sincerely hope that this helps. If there is any further information I can provide, or any action you wish for me to take, I would be happy to do so.