Fix neoforge thread causing resource loading to fail

This commit is contained in:
James Seibel
2025-12-26 14:13:27 -06:00
parent 505dbe2f62
commit ba923fa829
2 changed files with 2 additions and 2 deletions
@@ -104,7 +104,7 @@ public class JarUtils
*/
public static InputStream accessFile(String resource)
{
final ClassLoader loader = Thread.currentThread().getContextClassLoader();
final ClassLoader loader = JarUtils.class.getClassLoader();
// this is the path within the jar file
InputStream input = loader.getResourceAsStream(resource);
if (input == null)
@@ -493,7 +493,7 @@ public class CloudRenderHandler
private static boolean[][] getCloudsFromTexture() throws FileNotFoundException, IOException
{
final ClassLoader loader = Thread.currentThread().getContextClassLoader();
final ClassLoader loader = CloudRenderHandler.class.getClassLoader();
boolean[][] whitePixels = null;
try(InputStream imageInputStream = loader.getResourceAsStream(CLOUD_RESOURCE_TEXTURE_PATH))