Fix NbtIo crash when loading appdata

This commit is contained in:
altrisi committed 2021-01-14 20:40:31 +01:00
1 parent 97609d9c44
commit ecbd7f1dd7
1 file changed
+7 -2
@@ -76,9 +76,14 @@ public class FileModule extends Module
}
catch (IOException e)
{
try
// Copy of NbtIo.read(File) because that's now client-side only
if (!file.exists())
{
return NbtIo.read(file);
return null;
}
try (DataInputStream in = new DataInputStream(new FileInputStream(file)))
{
return NbtIo.read(in);
}
catch (IOException ioException)
{