SuperMartijn642 / Wormhole

11 stars 5 forks source link

[Crash] with mod scanning through resource packs #30

Closed Meduris closed 2 years ago

Meduris commented 2 years ago

Version Info

Steps to Reproduce Just include the code below into a mod and try to run it with your mod...

for(Map.Entry<ResourceLocation, Resource> entry : manager.listResources("textures", T -> T.getPath().endsWith("texture_package.json")).entrySet())
{
}

Crash report (~/logs/latest.log) crash report

Possible fixes:

SuperMartijn642 commented 2 years ago

Whoops, the .pdn files are just mock ups I use as an initial reference, however I did not know anything would try interact with them. I have now excluded any files ending in .pdn from being copied to the jar, so hopefully this shouldn't happen again.

It is fixed now in Wormhole 1.1.10. Thank you for reporting the issue!

Meduris commented 2 years ago

Thanks a lot for the quick fix.

Just a small heads up, it is not even about us trying to do anything with the pdn files specifically. We are basically just scanning existing resources inside the "textures" folders for files related to our texture system and while filtering through the resources forge/minecraft then complains about everything in the textures folder that doesn't comply with their resource name limitations (which is checked with the following regex [a-z0-9/._-])