Fix neoforge thread causing resource loading to fail
This commit is contained in:
@@ -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)
|
||||
|
||||
+1
-1
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user