Fusion (Connected Textures)

Fusion (Connected Textures)

40M Downloads

[Bug] Model Modifiers not loaded

deftesthawk opened this issue ยท 3 comments

commented

Version Info

  • Minecraft 1.18.2 and before, also tested 1.16.5
  • Fusion 1.2.7a
  • Forge 40.3.10
  • Tested with only Fusion and my resource packs installed

Description of the Bug
On older versions of minecraft fusion doesn't appear to load files from my resource pack that are in directories like this:
GEO - v1.68.0 - Fusion.zip\fusion-overrides\assets\minecraft\fusion\model_modifiers\blocks
Whereas they are correctly loaded in newer versions. I figured out that this was the cause of the issue due to amethyst clusters still working as their files are not located within that folder path.

Also while testing to see which version this issue ended on I found out that fusion doesn't work on 1.19 and 1.19.1, these versions give the error: Fusion needs language provider javafml:43 or above to load.

Steps to Reproduce

  • Create a test modpack using forge on 1.18.2
  • Install Fusion and both my resource packs: GEO and GEO - Fusion
  • load game
  • enable both my resource packs (make sure the fusion one is at the top)
  • look at any ores and you can also look at amethyst clusters to see that they work
commented

The #getResources method for zip resource packs had an integer depth parameter. The vanilla implementation compared the folder depth of a file against this depth paramater like folderDepth >= depth + 1 and only returned files which passed that check.
In my implementation, which does the same for files in the overrides folder, I simplied the check to folderDepth > depth.

It turns out vanilla passes the maximum integer value to the depth parameter in some places. This means adding 1 to the depth, depth + 1, makes it overflow to a negative value and hence makes it always pass the check ๐Ÿ™ƒ. As I was comparing it directly to the depth parameter, it would not overflow and thus never pass the check in these cases.

Since this was specifically for the zip resource pack handler and only when listing resources, it uniquely affected model modifiers in zipped resource packs.

I now also add 1 to the depth to make it overflow, so files in the overrides folder should work the same as in the regular assets folders.
Version 1.2.8 of Fusion should thus fix the issue.
Thank you for reporting the issue!

commented

I just did some testing, and it's working great. Also the emissive textures are looking really bright, I haven't compared them but just by looking at them, they look fixed. Thanks for all the hard work! :)

The All The Mod 9 Modpack still has an issue where textures within fusion\model_modifiers\blocks aren't loaded, but it seems like that's a mod conflict, as my test modpack with the same modloader and minecraft version doesn't have the issue. I have no idea what mod could be causing it, and I don't particularly feel like going through an ATM modpack to find the issue, as they are very unoptimized in my experience ๐Ÿ˜… Thanks again!

commented

Update:
People are also experiencing this bug on 1.20.1.
I tested on All The Mods 9 which comes pre-installed with fusion and only a small selection of the ores were glowing
(the ones that don't use fusion\model_modifiers\blocks directories)