Merge pull request #675 from altrisi/1.17-nbtio-crash
Fix NbtIo crash when loading appdata
This commit is contained in:
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)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user